// import fsPromises from 'fs/promises'
import fse from 'fs-extra'

const configJson = await fse.readJsonSync('./config.json', { throws: false })

const config = {
  blog: {
    glob: 'D:/Git/project/at/blog-pdf/output/**/*.pdf',
    index: 0,
  },
  ...configJson,
}

export const saveConfig = () => {
  fse.writeJSONSync('./config.json', config)
}

export default config
